package com.maxatime.controller;

import com.maxatime.common.constant.BusinessContents;
import com.maxatime.pojo.entity.SysMenu;
import com.maxatime.pojo.entity.SysRole;
import com.maxatime.service.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 菜单权限表 前端控制器
 * </p>
 *
 * @author Ssb
 * @since 2024-07-15
 */
@Controller
@RequestMapping("/sysMenu")
public class SysMenuController {

    @Autowired
    ISysMenuService isysMenuService;

    /**
     * @Author
     * @Description 菜单查
     * @Date
     * @Return
     * @param sysRole
     */
    @RequestMapping("/quest")
    @ResponseBody
    public Map<String,Object> quest(@RequestBody SysMenu SysMenu){
        Map<String,Object> m = new HashMap<>();
        Map<String,Object> map = isysMenuService.map(SysMenu);
        m.put(BusinessContents.CODE, "0000");
        m.put(BusinessContents.MSG, "交易成功");
        m.put(BusinessContents.DATA, map.get("list"));
        m.put("pageInfo", map.get("pageInfo"));
        return m;
    }
}

